home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 35
/
035.d81
/
disk lock
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
109 lines
5 gosub60100:clr
20 poke53280,6:poke53281,0:restore
22 print"[147][158] [196]isk [204]ocker"
24 print" by [210]uth [193]. [200]icks"
30 for i=0 to 4:read f$(i):next:ct=0
40 data del,seq,prg,usr,rel
50 for i=0 to 4:read l$(i):next
60 data del<,seq<,prg<,usr<,rel<
70 t=18:s=1
80 print" [196] [154]- [204]ock a whole disk"
82 print" [198] [154]- [204]ock one file"
84 print" [209] [154]- [209]uit this program"
88 print" [208]ress [196][154], [198][154], or [209][154]."
90 getq$:ifq$=""then90
92 ifq$="d"orq$="[196]"then100
94 ifq$="f"orq$="[198]"then100
96 ifq$="q"orq$="[209]"thenmm=.:gosub60000:goto90
99 goto90
100 mm=1:print"[201]nsert disk to be locked in drive and"
105 print"press [211][208][193][195][197]."
106 geta$:ifa$<>" "then106
120 print"[147]":print tab(4)" # ";tab(8)" [196]irectory [206]ame ";tab(27)" [198]ile [146]"
125 print
130 open 15,8,15
140 print#15,"i0"
150 input#15,en,em$,et,es
160 if en<>0 then print" dos error":goto 1050
170 open 7,8,7,"#0"
180 print#15,"u1"7;0;t;s
190 input#15,en,em$,et,es
200 if en<>0 then print" dos error":goto 1000
210 print#15,"m-r";chr$(0);chr$(3);chr$(255)
220 bt=t:bs=s
230 print#15,"b-p";7;0
240 get#7,t$
250 if t$="" then t$=chr$(0)
260 get#7,s$
270 if s$="" then s$=chr$(0)
280 t=asc(t$):s=asc(s$)
300 for i=0 to 7
310 print#15,"b-p";7;2+b
320 get#7,b$
330 for j=0 to 4
340 if b$=chr$(128+j) then b$=f$(j):j=4
350 if b$=chr$(192+j) then b$=l$(j):j=4
360 next j
500 print#15,"b-p";7;5+b
510 for k=0 to 15
520 get#7,c$
530 if c$="" then c$=chr$(0)
540 c=asc(c$)
550 if c$=chr$(0) then e=e+1
560 if c>31 and c<91 then cc$=cc$+c$
570 if e=16 and t=0 then k=15:goto 990
580 next k
590 ct=ct+1
800 print tab(4)ct;tab(8)cc$;tab(28)b$:cc$=chr$(0):e=0:d$=b$:b$=chr$(0)
810 if q$="f" then gosub 2000
820 if q$="d" then gosub 2030
830 b=b+32
840 next i
850 if t<>0 then b=0:goto 180
990 if q$="d" then q$=chr$(0):b=0:t=bt:s=bs:goto 180
1000 close 7
1010 input#15,en,em$,et,es
1050 close 15
1060 if en<>0 then print:print:print en,em$,et,es
1070 print"[158] [197]nd [207]f [196]irectory ... [208]ress [211][208][193][195][197]":poke198,.
1080 geta$:ifa$<>" "then1080
1090 goto20
2000 print tab(5)"[154][195]hange this file? ([217][154]/[206][154]/[209][154])":poke198,.
2005 geta$:ifa$<>"n"anda$<>"y"anda$<>"[206]"anda$<>"[217]"anda$<>"q"anda$<>"[209]"then2005
2010 ifa$="n"ora$="[206]"then return
2020 ifa$="q"ora$="[209]"thengosub60000:if(ab)thenclose7:close15:goto20
2030 for j=0 to 4
2040 if d$=f$(j) then d$=chr$(192+j):j=4
2050 if d$=l$(j) then d$=chr$(128+j):j=4
2060 next j
2070 print#15,"b-p";7;2+b
2080 print#7,d$;
2090 print#15,"u2"7;0;bt;bs
3000 if en<>00 then print:print" disk error"en,em$,et,es:goto 1000
3010 print#15,"b-p";7;5+b
3020 return
60000 ab=.:print" [154][193]re you sure you want to quit? ([217][154]/[206][154])":poke198,.
60010 geta$:ifa$<>"n"anda$<>"[206]"anda$<>"y"anda$<>"[217]"then60010
60020 ifa$="y"ora$="[217]"thenab=1:goto60040
60030 print"[145] [145][145]":return
60040 if(mm)thenreturn
60045 close15:open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
60050 ifer<>63thenend
60060 load"hello connect",8
60100 poke53280,6:poke53281,3
60110 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
60120 fora=1to23:print"[221]"spc(38)"[221]";:next
60130 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]"
60140 print"[149] [204][207][193][196][211][212][193][210] [208]resents:"
60145 print" [146] ";
60150 print" [196]isk [204]ocker [154] [146] ";
60155 print" [154] [146] ";
60160 print" [194]y [210]uth [200]icks [154] [146] ";
60165 print" [154] [146] ";
60170 print" ([195])opyright 1987 [154] [146] ";
60172 print" [154] [146] ";
60175 print" [154] [146]"
60180 print"[149] [208]ress [211][208][193][195][197] to continue."
60190 geta$:ifa$<>" "then60190
60195 return